﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// NotReviewedButNeeded
#pragma once

#include "AssertHelper.h"

#ifdef _WINDOWS
    #define GBMP_ASSERT(EXPRESSION) \
    if(!(EXPRESSION)) \
    { \
        if(gcmp::IsAssertEnabled()) \
            gcmp::AssertHelper::GetInstance()->Assert(_CRT_WIDE(#EXPRESSION), _CRT_WIDE(__FILE__), __LINE__);\
        else \
            gcmp::DumpAssertToLog(#EXPRESSION, __FILE__, __LINE__, __FUNCTION__); \
    }
#else
    #define GBMP_ASSERT(EXPRESSION) \
    if(!(EXPRESSION)) \
    { \
        if(gcmp::IsAssertEnabled()) \
            gbmp_assert_impl(EXPRESSION); \
        else \
            gcmp::DumpAssertToLog(#EXPRESSION, __FILE__, __LINE__, __FUNCTION__); \
    }
#endif

